package cn.silver.module.web.model;

import cn.silver.framework.core.validate.auth.SocialGroup;
import cn.silver.framework.social.model.SocailModel;
import jakarta.validation.constraints.NotBlank;

public class LoginSocialModel {

    @NotBlank(message = "{social.source.not.blank}", groups = {SocialGroup.class})
    private String source;

    @NotBlank(message = "{social.code.not.blank}", groups = {SocialGroup.class})
    private String socialCode;

    @NotBlank(message = "{social.state.not.blank}", groups = {SocialGroup.class})
    private String socialState;

    public SocailModel convertSocialModel() {
        return new SocailModel(this.source, this.socialCode, this.socialState);
    }
}
